<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>操作样式</title>
    <script src="../mayun/jquery-3.6.0.min.js" type="text/javascript"></script>
    <style type="text/css">
    .baseClass{background-color: aliceblue;}
    .focusClass{background-color: aqua;border: 2px dotted red;}
    .inverseColor{color: seashell;background-color: sienna;}
    </style>
</head>
<body>
<img src="./QQ图片20210622211656.jpg"><hr/>
<input type="button" value="放大图片" onclick="enlargeimage()"/>
<input type="button" value="缩小图片" onclick="lessengeimage()"/>
<script type="text/javascript">
function enlargeimage(){
    $("img").css({
        width:function(index,value){
            return parseFloat(value) * 1.1;
            },
            height:function(index,value){
            return parseFloat(value) * 1.1;
            }    
    });
}
function lessengeimage(){
    $("img").css({
        width:function(index,value){
            return parseFloat(value) * 0.9;
            },
            height:function(index,value){
            return parseFloat(value) * 0.9;
            }    
    });
    }
</script>
</body>
</html>